package com.sure.oa.func.security.login;


import com.sure.oa.base.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/security/login")
public class SecurityLoginController {

    @Autowired
    private SecurityLoginService securityLoginService;

    @RequestMapping("")
    public Result login(String u_id, String u_pwd){

        boolean ok = securityLoginService.checkLogin(u_id,u_pwd);

        if(ok){
            return Result.success("登录成功！");
        }

        return Result.fail("用户名或密码错误！");

    }


}
